﻿@model List<dai_hoc_tuong_lai.Areas.Admin.Models.NewsModel>
@{ FarmeWork.Helper.StringHelpers helperStr = new FarmeWork.Helper.StringHelpers(); }
@if (Model.Count() > 0)
{
    <div id="featPosts">
        <ul class="slides_container">
            @foreach (var item in Model)
            {
                <li class="slide">
                    <div class="cover">
                        <a href="/tin-tuc/@item.Id/@helperStr.RemoveSign4VietnameseString(item.Title)" title="@item.Title">
                            <img src="@item.Images" alt="@item.Title" class="Thumbnail thumbnail homepage-slider "
                                width="730" height="300"></a></div>
                    <div class="postcontent">
                        <h2 class="title">
                            <a href="/tin-tuc/@item.Id/@helperStr.RemoveSign4VietnameseString(item.Title)" title="@item.Title">
                                @item.Title</a></h2>
                        <p>
                            @Html.Raw(item.Description)</p>
                    </div>
                    <!-- end .postcontent -->
                </li>
            }
        </ul>
        <ul id="postsSmall" class="pagination">
            @{int i = 0;}
            @foreach (var item in Model)
            {
                if (i == 0)
                {
                    <li class="current"><a href="#@i" rel="nofollow">@item.TitleSilde</a></li>
                }
                else
                {
                    <li><a href="#@i" rel="nofollow">@item.TitleSilde</a></li>
                }

                i++;
            }
            
        </ul>
        <div class="cleaner">
            &nbsp;</div>
    </div>
}
else
{
    <p style="padding: 10px">Dữ liệu đang cập nhật ...</p>
}
<!-- end .slides_container -->
<script type="text/javascript">
    jQuery(document).ready(
	function ($) {
	    $('#featPosts').slides({
	        preload: true,
	        effect: 'slide',
	        play: 5000, hoverPause: true,
	        autoHeight: true,
	        generatePagination: false,
	        generateNextPrev: false
	    });
	});
</script>
